import request from "@/utils/request.js";

const api_prefix = "/user/goods/log";

export function getWaitDelivery(userId) {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/wait/delivery/goods/${userId}`,
    method: "GET",
  });
}

export function getWaitTake(userId) {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/wait/take/goods/${userId}`,
    method: "GET",
  });
}

export function getWaitComment(userId) {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/wait/comment/goods/${userId}`,
    method: "GET",
  });
}

export function confirmTakeGoods(goodsId, orderId) {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/confirm/take/${goodsId}/${orderId}`,
    method: "POST",
  });
}

export function getEnd(userId) {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/end/goods/${userId}`,
    method: "GET",
  });
}
